package com.ruoyi.stock2.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.DownTradedataScheduleMapper;
import com.ruoyi.stock2.domain.DownTradedataSchedule;
import com.ruoyi.stock2.service.IDownTradedataScheduleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 下载交易进度Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-01-02
 */
@Service
public class DownTradedataScheduleServiceImpl implements IDownTradedataScheduleService 
{
    @Autowired(required = false)
    private DownTradedataScheduleMapper downTradedataScheduleMapper;

    /**
     * 查询下载交易进度
     * 
     * @param id 下载交易进度ID
     * @return 下载交易进度
     */
    @Override
    public DownTradedataSchedule selectDownTradedataScheduleById(Long id)
    {
        return downTradedataScheduleMapper.selectDownTradedataScheduleById(id);
    }

    /**
     * 查询下载交易进度列表
     * 
     * @param downTradedataSchedule 下载交易进度
     * @return 下载交易进度
     */
    @Override
    public List<DownTradedataSchedule> selectDownTradedataScheduleList(DownTradedataSchedule downTradedataSchedule)
    {
        return downTradedataScheduleMapper.selectDownTradedataScheduleList(downTradedataSchedule);
    }

    /**
     * 新增下载交易进度
     * 
     * @param downTradedataSchedule 下载交易进度
     * @return 结果
     */
    @Override
    public int insertDownTradedataSchedule(DownTradedataSchedule downTradedataSchedule)
    {
        return downTradedataScheduleMapper.insertDownTradedataSchedule(downTradedataSchedule);
    }

    /**
     * 修改下载交易进度
     * 
     * @param downTradedataSchedule 下载交易进度
     * @return 结果
     */
    @Override
    public int updateDownTradedataSchedule(DownTradedataSchedule downTradedataSchedule)
    {
        return downTradedataScheduleMapper.updateDownTradedataSchedule(downTradedataSchedule);
    }

    /**
     * 删除下载交易进度对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDownTradedataScheduleByIds(String ids)
    {
        return downTradedataScheduleMapper.deleteDownTradedataScheduleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除下载交易进度信息
     * 
     * @param id 下载交易进度ID
     * @return 结果
     */
    @Override
    public int deleteDownTradedataScheduleById(Long id)
    {
        return downTradedataScheduleMapper.deleteDownTradedataScheduleById(id);
    }

    @Override
    public DownTradedataSchedule selectDownTradedataScheduleByName(String name) {
        return downTradedataScheduleMapper.selectDownTradedataScheduleByName(name);
    }
}
